//
//  ExchangeSuccessViewController.m
//  LineMoney
//
//  Created by 范琦 on 16/7/22.
//  Copyright © 2016年 范琦. All rights reserved.
//

#import "ExchangeSuccessViewController.h"

@interface ExchangeSuccessViewController ()

@end

@implementation ExchangeSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"提交成功";
    
    UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStylePlain target:self action:@selector(_didClickBackBarButtonItem:)];
    barButtonItem.tintColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem = barButtonItem;

    UIImageView *Cimage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"成功对勾"]];
    Cimage.frame = CGRectMake(150 * KSCREENWIDTH / 375, 82 * KSCREENHEIGHT / 667, 76 * KSCREENWIDTH / 375, 76 * KSCREENHEIGHT / 667);
    [self.view addSubview:Cimage];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 178 * KSCREENHEIGHT / 667, KSCREENWIDTH, 15 * KSCREENHEIGHT / 667)];
    [self.view addSubview:label];
    label.text = @"恭喜您交易成功";
    label.textAlignment = NSTextAlignmentCenter;
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 207 * KSCREENHEIGHT / 667, KSCREENWIDTH, 12 * KSCREENHEIGHT / 667)];
    label1.text = @"请密切关注您的账户信息";
    label1.textColor = [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1];
    label1.textAlignment = NSTextAlignmentCenter;
    label1.font = [UIFont systemFontOfSize:12];
    [self.view addSubview:label1];
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.frame = CGRectMake(62 * KSCREENWIDTH / 375, 281 * KSCREENHEIGHT / 667, 251 * KSCREENWIDTH / 375, 41* KSCREENHEIGHT / 667) ;
    btn.backgroundColor = BACKGROUNDCOLOR;
    [btn setTitle:@"继续提交" forState:UIControlStateNormal];
    [self.view addSubview:btn];
    btn.layer.cornerRadius = 22;
    btn.layer.masksToBounds = YES;
    btn.tintColor = [UIColor whiteColor];
    [[btn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
       
        [self.navigationController popToRootViewControllerAnimated:YES];
        
    }];

}

- (void)_didClickBackBarButtonItem:(id)sender
{
    
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
